﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XH.BMS.Models;

namespace XH.BMS.ViewModels
{
    public class SettingsViewModel
    {
        public List<SettingsModel> SettingModel { get; set; } = new List<SettingsModel>();
        public SettingsViewModel()
        {
            // 初始化设置列表
            SettingModel = new List<SettingsModel>()
            {
                new SettingsModel()
                {
                    SettingTitle = "报警设置",
                    SettingConfig = new List<Config>()
                    {
                        new Config()
                        {
                            ConfigTitle = "单节电压",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "总电压",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "电芯温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "环境温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "功率温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "电流温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "压差温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "上限(充电)",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "下限(放电)",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                    }
                },
                new SettingsModel()
                {
                    SettingTitle = "电压设置",
                    SettingConfig = new List<Config>()
                    {
                        new Config()
                        {
                            ConfigTitle = "单节过充",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[V]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[V]",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "单节过放",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[V]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[V]",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "总压过充",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[V]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[V]",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "总压过放",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[V]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[V]",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                    }
                },
                new SettingsModel()
                {
                    SettingTitle = "温度设置",
                    SettingConfig = new List<Config>()
                    {
                        new Config()
                        {
                            ConfigTitle = "充电温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "高温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "高温恢复",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温恢复",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "放电温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "高温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "高温恢复",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温恢复",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "环境温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "高温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "高温恢复",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温恢复",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "功率温度",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "高温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "高温恢复",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温保护",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "低温恢复",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                    }
                },
                new SettingsModel()
                {
                    SettingTitle = "电流设置",
                    SettingConfig = new List<Config>()
                    {
                        new Config()
                        {
                            ConfigTitle = "充电电流",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "锁定次数",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "发电电流Ⅰ",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "锁定次数",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "发电电流Ⅱ",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "锁定次数",
                                    OptionValue = "12.3"
                                }
                            }
                        },
                        new Config()
                        {
                            ConfigTitle = "短路电流",
                            ConfigOption = new List<Option>
                            {
                                new Option()
                                {
                                    OptionTitle = "保护[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "延时[ms]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "恢复[A]",
                                    OptionValue = "12.3"
                                },
                                new Option()
                                {
                                    OptionTitle = "锁定次数",
                                    OptionValue = "12.3"
                                }
                            }
                        },

                    }
                },
                new SettingsModel()
                {
                    SettingTitle = "其他设置",
                    SettingConfig = new List<Config>()
                }
            };
        }
    }
}
